package com.rui.study.algorithm.L_深入拆解JVM_即时编译;

/**
 * @program: study
 * @description:
 * @author: Yaowr
 * @create: 2018-12-19 11:12
 **/
public class CompilationTest2 {

    public static int hash(Object o) {
        if (o instanceof Exception) {
            return System.identityHashCode(o);
        } else {
            return o.hashCode();
        }
    }

    public static void main(String[] args) throws Exception {
        for (int i = 1; i <= 500_000; i++) {
            hash(i);
        }
        Thread.sleep(2000);
    }
}
